package com.chj.comp.common.auth.config;

import lombok.Data;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;
import java.util.List;

/**
 * @author ：cuihui
 * @date ：Created in 2022/2/22
 * @description：security配置类
 * @modified By：
 */

@Data
@Configuration
@RefreshScope
@ConditionalOnExpression("!'${security.config}'.isEmpty()")
@ConfigurationProperties(prefix = "security.config", ignoreInvalidFields = true)
public class SecurityConfig {
    /**
     * 客户端id
     */
    private String clientId;

    /**
     * 客户端密码
     */
    private String clientSecret;

    /**
     * jwt token存储秘钥
     */
    private String signingKey;

    /**
     * 放行url
     */
    private List<String> ignoreUrls;

    /**
     * 资源id
     */
    private String resourceId;

    /**
     * token获取/刷新url
     */
    private String getToken;

    /**
     * 删除token
     */
    private String removeToekn;
}
